package com.example.rabbitmqtopic;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author canger
 * @Deseription topic的监听器
 * @create 2018/9/4 11:35
 **/
@Component
public class Receiver {

    @RabbitListener(queues = "topic.message")
    public void process1(String str){
        System.out.println("消息队列:"+str);
    }

    @RabbitListener(queues = "test")
    public void process2(String str){
        System.out.println("消息队列s:"+str);
    }

}
